package com.twu.biblioteca;

public class Movie {
    String name, director;
    int year, rating;

    public Movie(String inName, String inDirector, int inYear, int inRating) {
        name = inName;
        director = inDirector;
        year = inYear;
        rating = inRating;
    }

    public String toString() {
        String ratingString = (rating == -1) ?
                "N/A" : Integer.toString(rating);
        return name + "|" + director + "|" + year + "|" + ratingString;
    }
}
